<?php

require_once "core/application/models/mexchange/mexchange2.php";

class Mexchange3 extends Mexchange2 {

    private $_query;
    private $_fetch = array();
    public $_chars = array();

    protected function getListChars() {
        /**
         *  список чаров
         */
        DB::getInstance()->openConnectionToGS();
        $this->_query = "SELECT `name` FROM `players` WHERE `account_name` = '$_SESSION[name]'";
        $getChars = DB::getInstance()->sql($this->_query);
        while ($this->_fetch = mysql_fetch_assoc($getChars)) {
            $this->_chars[] = $this->_fetch['name'];
        }
        unset($this->_query, $this->_fetch);
        return $this->_chars;
        DB::getInstance()->closeConnection();
    }

}

?>